﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucArticle.ascx.cs" Inherits="SES.CMS.AdminCP.PageUC.ucArticle" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dxpc" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register assembly="CKEditor.NET" namespace="CKEditor.NET" tagprefix="CKEditor" %>
<%@ Register assembly="DevExpress.Web.ASPxTreeList.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxTreeList" tagprefix="dxwtl" %>
<style type="text/css">
 .tablex td
{
	border:1px solid grey;
	height:25px;
	padding-left:2px;
}
.tablex
{
border-collapse:collapse;
}
    .style1
    {
        width: 200px;
        height: 9px;
    }
    .style3
    {
        width: 554px;
    }
    .style4
    {
        width: 619px;
        height: 44px;
    }
    .style5
    {
        width: 200px;
        text-align:center;
    }
    .style6
    {
        height: 9px;
    }
    .style7
    {
        width: 929px;
        height: 17px;
    }
    .style8
    {
        width: 554px;
        height: 9px;
    }
    .style9
    {
        vertical-align:top;
    }
    .style10
    {
        height: 9px;
    }
</style>
<script type="text/javascript">
    function SelectAndClosePopup(value) {
        cbCategory.SetValue(value);
        pcParent.Hide();
    }
</script>

<h2>
    Cập nhật Tin tức</h2>
<table width="100%" cellpadding="0" cellspacing="0">
    <tr>
        <td class="style10">
             <asp:TabContainer ID="TabContainer3" runat="server" ActiveTabIndex="0" 
                 Width="100%">  
               <asp:TabPanel ID="TabPanel5" runat="server" HeaderText="Thông tin:">
               <ContentTemplate>
               <table class="tablex" cellpadding="0" cellspacing="0">
<tr>
<td class="style8">
            Tiêu đề:
         </td>
        <td class="style6">
            <asp:TextBox ID="txtTitle" runat="server" Width="300px" 
                ValidationGroup="submitGrp"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtTitle" ErrorMessage="*** Cần nhập tiêu đề" 
                ValidationGroup="submitGrp"></asp:RequiredFieldValidator>
        </td>
        <td class="style1">
            <asp:FileUpload ID="fuImage" runat="server" />
            </td>
    </tr>
    <tr>
        <td class="style3">
            Tiêu đề TA:
         </td>
        <td class="style7">
            <asp:TextBox ID="txteTitle" runat="server" Width="300px" 
                ValidationGroup="submitGrp"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                ControlToValidate="txtTitle" ErrorMessage="*** Cần nhập tiêu đề" 
                ValidationGroup="submitGrp"></asp:RequiredFieldValidator>
        </td>
        <td class="style5" rowspan="4">
            <asp:Image ID="imgNews" Visible="false" runat="server" Height="150px" Width="150px" />
        </td>
    </tr>
    <tr>
        <td class="style3" rowspan="2">
            Hiển thị</td>
        <td class="style7">
                <asp:CheckBox ID="chkIsHomePage" runat="server" />
                Hiện ở trang chủ &nbsp;&nbsp;</td>
    </tr>
    <tr>
        <td class="style7">
                <asp:CheckBox ID="chkIsPublish" runat="server" />
                Ẩn đi &nbsp;&nbsp;</td>
    </tr>
    <tr>
        <td class="style3">
            Số thứ tự:&nbsp;</td>
        <td class="style7">
            <div style="float: left; vertical-align: middle;">
                <asp:TextBox ID="txtOrderID" runat="server" Width="68px" 
                    ValidationGroup="submitGrp"></asp:TextBox>
            </div>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="txtOrderID" ErrorMessage="*** Cần nhập số thứ tự" 
                ValidationGroup="submitGrp"></asp:RequiredFieldValidator>
            <asp:ListBox ID="lstbCategory" runat="server" SelectionMode="Multiple">
            </asp:ListBox>
        </td>

</tr>
</table>
                 </ContentTemplate>
               </asp:TabPanel>
                 <asp:TabPanel ID="TabPanel8" runat="server" HeaderText="Danh mục">
                 <ContentTemplate>
                 <dxwtl:ASPxTreeList ID="ASPxTreeList1" runat="server" 
                AutoGenerateColumns="False" KeyFieldName="CategoryID" 
                ParentFieldName="ParentID" Width="100%" 
                         CssFilePath="~/App_Themes/SoftOrange/{0}/styles.css" 
                         CssPostfix="Soft_Orange" onhtmlrowprepared="ASPxTreeList1_HtmlRowPrepared">
                     <SettingsPager>
                         <AllButton>
                             <Image Height="19px" Width="28px" />
                         </AllButton>
                         <FirstPageButton>
                             <Image Height="19px" Width="23px" />
                         </FirstPageButton>
                         <LastPageButton>
                             <Image Height="19px" Width="23px" />
                         </LastPageButton>
                         <NextPageButton>
                             <Image Height="19px" Width="19px" />
                         </NextPageButton>
                         <PrevPageButton>
                             <Image Height="19px" Width="19px" />
                         </PrevPageButton>
                     </SettingsPager>
                <Columns>
                    <dxwtl:TreeListTextColumn FieldName="CategoryID" Name="clCategoryID" 
                        VisibleIndex="0" Visible="False">
                    </dxwtl:TreeListTextColumn>
                    <dxwtl:TreeListTextColumn FieldName="Title" Name="clTitle" VisibleIndex="0">
                    </dxwtl:TreeListTextColumn>
                     </Columns>
                     <Settings SuppressOuterGridLines="True" />
                <SettingsSelection Enabled="True" />
                     <SettingsLoadingPanel Text="" />
                     <SettingsText LoadingPanelText="" />
                     <Images ImageFolder="~/App_Themes/SoftOrange/{0}/">
                         <CollapsedButton Height="13px" 
                             Url="~/App_Themes/SoftOrange/TreeList/CollapsedButton.png" Width="13px" />
                         <ExpandedButton Height="13px" 
                             Url="~/App_Themes/SoftOrange/TreeList/ExpandedButton.png" Width="13px" />
                         <CustomizationWindowClose Height="18px" Width="18px" />
                     </Images>
                     <Styles CssFilePath="~/App_Themes/SoftOrange/{0}/styles.css" 
                         CssPostfix="Soft_Orange">
                     </Styles>
            </dxwtl:ASPxTreeList>
                 </ContentTemplate>
                 </asp:TabPanel>
             </asp:TabContainer>
             </td>
    </tr>
    <tr>
        <td class="style9">
            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Width="100%">               
                <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="Mô tả:">
                    <ContentTemplate>
                        <asp:TextBox ID="txtDescription" Width="100%" Height="100px" runat="server" 
                            TextMode="MultiLine"></asp:TextBox>
                    </ContentTemplate>
                </asp:TabPanel>

                <asp:TabPanel ID="TabPanel4" runat="server" HeaderText="Mô tả TA:">
                     <ContentTemplate>
                        <asp:TextBox ID="txteDescription" Width="100%" Height="100px" runat="server" 
                            TextMode="MultiLine"></asp:TextBox>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
        </td>
    </tr>

    <tr>
        <td class="style9">
            <asp:TabContainer ID="TabContainer2" runat="server" ActiveTabIndex="0" Width="100%">               
                <asp:TabPanel ID="TabPanel1" runat="server" HeaderText="Nội dung(Tiếng Việt):">
                    <ContentTemplate>
                        <CKEditor:CKEditorControl FilebrowserImageBrowseUrl="/ckfinder/ckfinder.html?type=Images" FilebrowserImageUploadUrl="/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images" BasePath="/ckeditor/" ID="txtArticleDetail" runat="server" Width="100%">
                        </CKEditor:CKEditorControl>
                    </ContentTemplate>
                </asp:TabPanel>

                <asp:TabPanel ID="TabPanel3" runat="server" HeaderText="Nội dung(Tiếng Anh)">
                    <ContentTemplate>
                        <CKEditor:CKEditorControl FilebrowserImageBrowseUrl="/ckfinder/ckfinder.html?type=Images" FilebrowserImageUploadUrl="/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images" BasePath="/ckeditor/"  ID="txteArticleDetail" runat="server" Width="100%">
            </CKEditor:CKEditorControl>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
        </td>
    </tr>

    <tr>
        <td class="style4">
            <asp:Button ID="btnSave" runat="server" Text="Lưu" OnClick="btnSave_Click" 
                ValidationGroup="submitGrp" />
            <asp:Button ID="btnReset" runat="server" Text="Hủy" />
        </td>
    </tr>
</table>




